Skip to content

Conversation

@tysg
Copy link

@tysg tysg commented Sep 8, 2025

htmlStream parser tripped at this attribute:

.=""

The parser doesn't allow attribute names to start with nor include dots.

W3 specs says attribute names can include dots but can't start with dots, while the more permissive whatwg specs allow both plus a lot more characters than [.:_-].

https://html.spec.whatwg.org/multipage/syntax.html#syntax-attribute-name
https://www.w3.org/TR/REC-html40/types.html#h-6.2

We meet somewhere in the middle to allow dots anywhere in attribute name but doesn't allow characters other than letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

@tysg tysg requested a review from rr0gi September 8, 2025 09:29
Copy link
Contributor

@rr0gi rr0gi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx

@rr0gi rr0gi merged commit 74d4988 into master Sep 12, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants